<?php defined('IN_YuLin') || exit('NO PERMIT!'); ?>
{template index/header}
 	<div class="subnav" style="margin-bottom:20px;">
        <a href="">首页</a> &gt; <a href="">系统管理</a> &gt; <a href="">文章管理</a>
    </div>
    <div class="x-nav">
    	<a class="layui-btn layui-btn-small" style="line-height:1.6em;margin:3px 0 20px 0;float:right" href="javascript:location.replace(location.href);" title="刷新">
    		<i class="layui-icon" style="line-height:30px">ဂ</i>
    	</a>
    	<a class="layui-btn layui-btn-small" style="line-height:1.6em;margin:3px 5px 20px 0;float:right" href="?m={$m}&c={$c}&a=add" title="添加">
    		<i class="layui-icon" style="line-height:30px">添加</i>
    	</a>
    	<a class="layui-btn layui-btn-small" style="line-height:1.6em;margin:3px 5px 20px 0;float:right" href="?m={$m}&c=category" title="分类管理">
    		<i class="layui-icon" style="line-height:30px">分类管理</i>
    	</a>
    </div>
    
    <div class="x-body" style="margin-top:20px;">
    	<div id="searchid" class="layui-clear">
    		<form name="searchform" class="layui-form" action="?" method="get" >
    			<input type="hidden" name="m" value="{$m}" />
    			<input type="hidden" name="c" value="{$c}" />
    			<input type="hidden" name="a" value="{$a}" />
    			<div class="left">
    				<select name="cid">
    					<option value="0">选择分类</option>
    					{loop $categorys as $key => $val}
                        <option value="{$key}"{if $cid==$key} selected="selected"{/if} >{$val['title']}</option>
                        {/loop}
    				</select>
    			</div>
    			<div class="left margin-l10">
    				<input name="title" id="title" type="text" value="{$title}" class="layui-input" style="width:260px;" placeholder="请输入文章标题" />
    			</div>
    			<div class="left margin-l10">
    				<input type="submit" name="search" class="layui-btn" value="搜索" />
    			</div>
    		</form>
    	</div>
    	
    	<table class="layui-table">
    		<thead>
    			<tr>
    				<th width="40">ID</th>
    				<th>标题</th>
    				<th>分类</th>
    				<th>彩票</th>
    				<th>添加时间</th>
    				<th>操作</th>
    			</tr>
    		</thead>
    		<tbody>
    			{loop $data as $val}
    			<tr>
    				<td class="text-c">{$val['id']}</td>
    				<td class="text-c" style='text-align:left;'>{$val['title']}</td>
    				<td class="text-c">{$categorys[$val['cid']]['title']}</td>
    				<td class="text-c">{$lotterys[$val['lotteryid']]['title']}</td>
    				<td class="text-c">{date('Y-m-d',$val['dateline'])}</td>
    				<td class="text-c">
    					<a href="?m={$m}&c={$c}&a=add&id={$val['id']}">编辑</a> |
    					<a href="?m={$m}&c={$c}&a=del&id={$val['id']}" class="a-del">删除</a>
    				</td>
    			</tr>
    			{/loop}
    		</tbody>
    	</table>
    	<div id="pages" class="layui-laypage">{$multi}</div>
    </div>

{template index/footer}